home *** CD-ROM | disk | FTP | other *** search
/ Delphi Magazine Collection 2001 / Delphi Magazine Collection 20001 (2001).iso / DISKS / Issue42 / comcorn / DAXDoc / DAXDoc_TLB.pas < prev    next >
Encoding:
Pascal/Delphi Source File  |  1999-01-11  |  5.3 KB  |  153 lines

  1. unit DAXDoc_TLB;
  2.  
  3. // ************************************************************************ //
  4. // WARNING                                                                  //
  5. // -------                                                                  //
  6. // The types declared in this file were generated from data read from a     //
  7. // Type Library. If this type library is explicitly or indirectly (via      //
  8. // another type library referring to this type library) re-imported, or the //
  9. // 'Refresh' command of the Type Library Editor activated while editing the //
  10. // Type Library, the contents of this file will be regenerated and all      //
  11. // manual modifications will be lost.                                       //
  12. // ************************************************************************ //
  13.  
  14. // PASTLWTR : $Revision:   1.11.1.75  $
  15. // File generated on 1/11/99 4:38:29 AM from Type Library described below.
  16.  
  17. // ************************************************************************ //
  18. // Type Lib: C:\My Documents\DelphiMag, Feb99\DAXDoc\DAXDoc.tlb
  19. // IID\LCID: {C10BE34C-A81F-11D2-AF31-0000861EF0BB}\0
  20. // Helpfile: 
  21. // HelpString: Delphi ActiveX Document Server
  22. // Version:    1.0
  23. // ************************************************************************ //
  24.  
  25. interface
  26.  
  27. uses Windows, ActiveX, Classes, Graphics, OleCtrls, StdVCL;
  28.  
  29. // *********************************************************************//
  30. // GUIDS declared in the TypeLibrary. Following prefixes are used:      //
  31. //   Type Libraries     : LIBID_xxxx                                    //
  32. //   CoClasses          : CLASS_xxxx                                    //
  33. //   DISPInterfaces     : DIID_xxxx                                     //
  34. //   Non-DISP interfaces: IID_xxxx                                      //
  35. // *********************************************************************//
  36. const
  37.   LIBID_DAXDoc: TGUID = '{C10BE34C-A81F-11D2-AF31-0000861EF0BB}';
  38.   IID_IDelphiAxDoc: TGUID = '{C10BE34D-A81F-11D2-AF31-0000861EF0BB}';
  39.   CLASS_DelphiAxDoc: TGUID = '{C10BE34F-A81F-11D2-AF31-0000861EF0BB}';
  40. type
  41.  
  42. // *********************************************************************//
  43. // Forward declaration of interfaces defined in Type Library            //
  44. // *********************************************************************//
  45.   IDelphiAxDoc = interface;
  46.   IDelphiAxDocDisp = dispinterface;
  47.  
  48. // *********************************************************************//
  49. // Declaration of CoClasses defined in Type Library                     //
  50. // (NOTE: Here we map each CoClass to its Default Interface)            //
  51. // *********************************************************************//
  52.   DelphiAxDoc = IDelphiAxDoc;
  53.  
  54.  
  55. // *********************************************************************//
  56. // Interface: IDelphiAxDoc
  57. // Flags:     (4416) Dual OleAutomation Dispatchable
  58. // GUID:      {C10BE34D-A81F-11D2-AF31-0000861EF0BB}
  59. // *********************************************************************//
  60.   IDelphiAxDoc = interface(IDispatch)
  61.     ['{C10BE34D-A81F-11D2-AF31-0000861EF0BB}']
  62.   end;
  63.  
  64. // *********************************************************************//
  65. // DispIntf:  IDelphiAxDocDisp
  66. // Flags:     (4416) Dual OleAutomation Dispatchable
  67. // GUID:      {C10BE34D-A81F-11D2-AF31-0000861EF0BB}
  68. // *********************************************************************//
  69.   IDelphiAxDocDisp = dispinterface
  70.     ['{C10BE34D-A81F-11D2-AF31-0000861EF0BB}']
  71.   end;
  72.  
  73.  
  74. // *********************************************************************//
  75. // OLE Control Proxy class declaration
  76. // Control Name     : TDelphiAxDoc
  77. // Help String      : Delphi ActiveX Document Object
  78. // Default Interface: IDelphiAxDoc
  79. // Def. Intf. DISP? : No
  80. // Event   Interface: 
  81. // TypeFlags        : (2) CanCreate
  82. // *********************************************************************//
  83.   TDelphiAxDoc = class(TOleControl)
  84.   private
  85.     FIntf: IDelphiAxDoc;
  86.     function  GetControlInterface: IDelphiAxDoc;
  87.   protected
  88.     procedure CreateControl;
  89.     procedure InitControlData; override;
  90.   public
  91.     property  ControlInterface: IDelphiAxDoc read GetControlInterface;
  92.   published
  93.     property  TabStop;
  94.     property  Align;
  95.     property  DragCursor;
  96.     property  DragMode;
  97.     property  ParentShowHint;
  98.     property  PopupMenu;
  99.     property  ShowHint;
  100.     property  TabOrder;
  101.     property  Visible;
  102.     property  OnDragDrop;
  103.     property  OnDragOver;
  104.     property  OnEndDrag;
  105.     property  OnEnter;
  106.     property  OnExit;
  107.     property  OnStartDrag;
  108.   end;
  109.  
  110. procedure Register;
  111.  
  112. implementation
  113.  
  114. uses ComObj;
  115.  
  116. procedure TDelphiAxDoc.InitControlData;
  117. const
  118.   CControlData: TControlData2 = (
  119.     ClassID: '{C10BE34F-A81F-11D2-AF31-0000861EF0BB}';
  120.     EventIID: '';
  121.     EventCount: 0;
  122.     EventDispIDs: nil;
  123.     LicenseKey: nil;
  124.     Flags: $00000000;
  125.     Version: 401);
  126. begin
  127.   ControlData := @CControlData;
  128. end;
  129.  
  130. procedure TDelphiAxDoc.CreateControl;
  131.  
  132.   procedure DoCreate;
  133.   begin
  134.     FIntf := IUnknown(OleObject) as IDelphiAxDoc;
  135.   end;
  136.  
  137. begin
  138.   if FIntf = nil then DoCreate;
  139. end;
  140.  
  141. function TDelphiAxDoc.GetControlInterface: IDelphiAxDoc;
  142. begin
  143.   CreateControl;
  144.   Result := FIntf;
  145. end;
  146.  
  147. procedure Register;
  148. begin
  149.   RegisterComponents('ActiveX',[TDelphiAxDoc]);
  150. end;
  151.  
  152. end.
  153.